From: Juri Linkov Date: Wed, 12 Aug 2009 20:54:46 +0000 (+0000) Subject: (lgrep): Ensure that `default-directory' is always non-nil. (Bug#4052) X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~11134 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=d82d8c03cff58b2427ed9beb0f71c98d5e9bb56a;p=emacs.git (lgrep): Ensure that `default-directory' is always non-nil. (Bug#4052) --- diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 241a5325a1c..9e63c1d0611 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -827,7 +827,7 @@ This command shares argument histories with \\[rgrep] and \\[grep]." command nil nil 'grep-history)) (add-to-history 'grep-history command)))) (when command - (let ((default-directory dir)) + (let ((default-directory (or dir default-directory))) ;; Setting process-setup-function makes exit-message-function work ;; even when async processes aren't supported. (compilation-start (if (and grep-use-null-device null-device)